Debugging Node-RED
This guide provides comprehensive troubleshooting procedures for Node-RED issues on the OV20i camera system. Use this for field repair, debugging production issues, and preventative maintenance of inspection flows.
Safety First: Always notify production before making changes to active inspection systems. Create backups before modifying flows.
Emergency Quick-Fix Procedures
Critical System Down - Immediate Actions
Step | Action | Time | Result |
---|---|---|---|
1 | Check camera power LED status | 30 sec | Verify hardware OK |
2 | Access OV20i Node-RED: http://camera-ip/recipes/<recipe-number>/ioblock | 1 min | Confirm editor accessible |
3 | Look for red triangle error indicators | 1 min | Identify failing nodes |
4 | Click Deploy button (Full Deploy) | 30 sec | Reset all flows |
5 | Test basic inspection trigger | 2 min | Verify system operational |
System Recovery (If Editor Won't Load)
OV20i cameras do not have a safe mode - restart is the primary recovery method:
- Power cycle the camera (unplug power for 10 seconds)
- Wait for full boot (all 4 LEDs stable - 2-3 minutes)
- Access active recipe's Node-RED via recipe-specific URL
- Verify flow integrity and make necessary fixes
- Deploy changes to restore normal operation
URL Format: http://<camera-ip>/recipes/<recipe-number>/ioblock
Examples:
http://192.168.0.101/recipes/20/ioblock
http://192.168.0.105/recipes/1/ioblock
Systematic Debugging Process
Step 1: Identify the Problem Scope
Quick Assessment Questions
Question | If YES | If NO |
---|---|---|
Can you access OV20i Node-RED interface? | Continue to Step 2 | Check network/camera status |
Are flows visible in editor? | Continue to Step 2 | Power cycle camera and retry |
Do you see error triangles on nodes? | Focus on those nodes first | Check flow execution |
Is inspection triggering? | Check individual node outputs | Verify trigger inputs |
Access URL: Use recipe-specific URL format: http://<camera-ip>/recipes/<recipe-number>/ioblock
Step 2: Enable Debug Monitoring
Add Debug Nodes for Troubleshooting
- Place Debug nodes at key points in problematic flows:
- After trigger inputs
- Before and after logic nodes
- At final outputs
- Configure Debug nodes for maximum information:
- Output: Complete message object
- To: Debug sidebar
- Name: Descriptive names (e.g., "After Classification Logic")
- Enable all Debug nodes by clicking their buttons in the editor
Debug Sidebar Management
Access Debug Sidebar:
- Click Debug tab (bug icon) in right panel
- Clear old messages using trash can icon
- Filter messages if too many nodes are active
Debug Message Interpretation:
- Timestamp shows when message occurred
- Node name shows which node generated message
- Message content shows data structure and values
Step 3: Trace Flow Execution
Follow Message Path
- Start from trigger source (injection, timer, external input)
- Verify each node receives expected input
- Check message transformations at each step
- Identify where flow stops or produces wrong output
Common Flow Interruption Points
Node Type | Common Issues | Quick Check |
---|---|---|
Classification Logic | No confidence threshold met | Check ROI alignment, retrain model |
Switch Node | Wrong condition logic | Verify switch rules and message properties |
Join Node | Waiting for incomplete message set | Check message parts count |
Function Node | JavaScript errors | Check browser console for errors |
HTTP Request | Network connectivity | Test endpoint manually |
Common Node-RED Issues & Solutions
Flow Execution Problems
Issue: Flow Not Triggering
Symptoms:
- No messages in Debug sidebar
- System appears inactive
- External triggers not working
Diagnosis Steps:
- Check trigger source: Manual inject, timer, external input
- Verify wiring: Ensure connections between nodes
- Test manual trigger: Use Inject node to force flow start
Solutions:
Cause | Solution | Prevention |
---|---|---|
Disabled flows | Click Deploy → Full Deploy | Regular deployment after changes |
Broken connections | Rewire nodes properly | Visual inspection during edits |
Timer misconfiguration | Check inject node timing settings | Document timing requirements |
External trigger failure | Verify I/O wiring and signals | Regular I/O testing |
Issue: Flows Running But Wrong Results
Symptoms:
- Messages flowing but incorrect classifications
- Pass/fail logic not working correctly
- Inconsistent results
Diagnosis Process:
- Add Debug nodes before and after suspect nodes
- Compare expected vs actual message content
- Check node configurations for correct parameters
Solutions:
Problem Area | Check | Fix |
---|---|---|
Classification Logic | ROI alignment, model training | Retrain or adjust ROI |
Switch Conditions | Property names and values | Correct switch logic |
Message Properties | Data types and formats | Use Change node to fix format |
Context Variables | Stored values and scope | Clear/reset context storage |
Performance Issues
Issue: Slow Flow Execution
Symptoms:
- Delays between trigger and output
- Inspection timeouts
- System lag
Performance Diagnostics:
- Check Debug timestamps to identify slow nodes
- Monitor CPU usage on camera system
- Count active Debug nodes (disable unused ones)
Optimization Actions:
Performance Issue | Solution | Expected Improvement |
---|---|---|
Too many Debug nodes | Disable/remove unused Debug nodes | 10-20% speed increase |
Complex Function nodes | Optimize JavaScript code | Variable improvement |
High-frequency triggers | Add delay/rate limiting | Prevent system overload |
Large message objects | Reduce message payload size | Faster processing |
Maintenance Procedures
Daily Health Checks
Visual Flow Inspection (5 minutes)
- Access Node-RED editor
- Check for error indicators (red triangles)
- Verify flow connections are intact
- Review recent Debug messages for anomalies
Flow Execution Test (10 minutes)
- Manual trigger test using Inject nodes
- Verify expected outputs in Debug sidebar
- Test pass/fail logic with known good/bad parts
- Confirm external communications (PLC, databases)
Monthly Maintenance Tasks
Performance Review (15 minutes)
Flow Optimization Checklist:
Task | Action | Notes |
---|---|---|
Debug Node Cleanup | Disable unused Debug nodes | Keep only essential debugging |
Context Storage Review | Clear unnecessary stored values | Prevent memory buildup |
Error Log Review | Check browser console for errors | Document recurring issues |
Backup Creation | Export flows to backup file | Store with date/version info |
Configuration Validation (20 minutes)
- Compare current flows with documented standards
- Verify all critical paths have appropriate error handling
- Test error recovery scenarios
- Update documentation for any changes
Monthly Deep Maintenance
Comprehensive Flow Analysis (45 minutes)
Performance Metrics Collection:
- Flow execution times
- Error frequency analysis
- Resource usage patterns
- Communication reliability
Flow Structure Review:
- Eliminate redundant nodes
- Consolidate duplicate logic
- Update deprecated configurations
- Optimize complex Function nodes
Backup and Recovery Testing (30 minutes)
- Create complete flow export
- Test import procedure on backup system
- Verify backup restoration maintains functionality
- Document recovery procedures
Diagnostic Tools and Techniques
Built-in Node-RED Tools
Debug Sidebar Features
Feature | Use Case | Access Method |
---|---|---|
Message Filtering | Focus on specific nodes | Filter button in sidebar |
Message History | Review past 100 messages | Scroll in Debug sidebar |
Node Location | Find source of Debug message | Click node name in message |
Message Export | Save diagnostic data | Copy message content |
Context Data Explorer
Access Context Storage:
- Open OV20i Node-RED interface (
http://<camera-ip>/recipes/<recipe-number>/ioblock
) - Go to Context Data tab (right sidebar)
- View Node/Flow/Global context values
Context Debugging:
- Node Context: Check individual node state
- Flow Context: Verify shared flow variables
- Global Context: Review system-wide settings
Network Communication Testing
HTTP Request Validation:
- Use external tools (Postman, curl) to test endpoints
- Verify response formats match expected data
- Test error conditions (timeouts, invalid responses)
PLC Communication Verification:
- Use PLC programming software to verify connectivity
- Test data register access independently
- Validate data format conversions
Emergency Recovery Procedures
Flow Corruption Recovery
Symptoms of Corruption:
- OV20i Node-RED interface won't load flows
- Flows appear empty after camera restart
- Deployment fails repeatedly
Recovery Steps:
- Power cycle the OV20i camera:
- Unplug power for 10 seconds
- Wait for complete boot (all 4 LEDs stable)
- Access recipe's Node-RED interface:
- Navigate to
http://<camera-ip>/recipes/<recipe-number>/ioblock
- If flows are corrupted, import from backup
- Navigate to
- Restore from backup:
- Use OV20i recipe import function
- Import most recent backup file
- Verify all connections intact
- Validate restoration:
- Test all critical flows
- Verify external communications
- Update any configuration changes
System Resource Issues
Memory/CPU Overload
Immediate Actions:
- Disable non-essential Debug nodes in OV20i Node-RED
- Remove high-frequency timer triggers
- Simplify complex Function nodes
- Power cycle the camera to restart all services
Long-term Solutions:
- Optimize flow design for OV20i hardware
- Implement rate limiting
- Reduce message payload sizes
- Schedule maintenance windows
Troubleshooting Checklists
Pre-Maintenance Checklist
- Notify production of maintenance window
- Create current flow backup
- Document current system state
- Prepare rollback procedure
- Test backup restoration process
Post-Maintenance Validation
- All flows deploy successfully
- Manual trigger tests pass
- External communications verified
- Error indicators cleared
- Performance within acceptable range
- Documentation updated
Emergency Response Checklist
- System impact assessed
- Production notified
- Quick-fix attempted
- Backup restoration if needed
- Root cause identified
- Preventative measures implemented
Documentation and Logging
Maintenance Records
Required Documentation:
- Date/time of maintenance
- Issues identified and resolved
- Configuration changes made
- Performance improvements achieved
- Future recommendations
🔗 Related Resources
- Node-RED Basics
- Creating Your First Recipe
- Camera Communication Architecture
- Troubleshooting Power Issues
- Node-RED Architecture in OV20i
Document all changes made during debugging sessions. This helps with future troubleshooting and builds institutional knowledge for your team.